<%@ page contentType="text/html;charset=ISO8859_1" language="java" 
 import="git.bankview.sl.report.ReportCommon" %>

<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tld/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tld/struts-nested.tld" prefix="nested" %>

<jsp:useBean id="oLogon" class="git.bankview.wl.bean.LogonBean" scope="session" />
<jsp:useBean id="PageTunerForm" type="org.apache.struts.validator.DynaValidatorForm" scope="request" />
<%
	request.setAttribute("request", request);
	//java.util.List oAuthMethods = git.bankview.wl.auth.UserAuth.queryMethods(oLogon, "90060");
%>
<jsp:useBean id="oNavigate" class="git.bankview.wl.bean.TransNavigateBean" />
<jsp:setProperty name="oNavigate" property="transid" value="90060" />

<html:html locale="true">
<head>
	<title><logic:iterate id="element" name="oNavigate" property="navigateList"
	><bean:write name="element" property="translabel" />
	 - </logic:iterate><bean:message key="taskdependence.title" /></title>
	<link rel="stylesheet" href="../style/default_aux.css" id="oCssLink">
	<script language="javascript" src="../script/pagetuner.js"></script>
</head>
<body onload="oninit()">
	<script src="../script/overlib.js" language="JavaScript"></script>
	<script src="../script/style.js" language="JavaScript"></script>
	<script src="../script/windows.js" language="JavaScript"></script>
	<table cellspacing="0" class="filledframe">
		<tr>
			<td nowrap="" class="clientframe">
				<table id="oHelp" class="helper" >
					<tr><td>&nbsp;</td><td class="help"><input type="button" class="button" title="<bean:message key="common.help.title" />" onclick="help('help.report.schd');" value="<bean:message key="common.help" />" ></td>
					</tr>
				</table>
				<html:form action="/console/TaskDependence" styleId="oListForm">
					<input type="hidden" name="datekey" value="<%=request.getParameter("datekey")%>">
					<input type="hidden" name="taskid" value="<%=request.getParameter("taskid")%>">
					<logic:notEmpty name="PageTunerForm" property="sortIndexes">
						<logic:iterate id="element" name="PageTunerForm" property="sortIndexes">
							<input type="hidden" name="sortIndexes" value="<bean:write name="element" />" />
						</logic:iterate> 
					</logic:notEmpty>
					<html:hidden property="pageIndex" value="0" />
					<div class="listtitle"><logic:iterate id="element" name="oNavigate" property="navigateList"
						><logic:empty name="element" property="pageurl"><bean:write name="element" property="translabel" /></logic:empty
						><logic:notEmpty name="element" property="pageurl"><a href="..<bean:write name="element" property="pageurl" />" title="<bean:write name="element" property="transid" />"><bean:write name="element" property="translabel" /></a></logic:notEmpty
						><img src="../images/navconn.gif" ></logic:iterate><bean:message key="taskdependence.title" 
						/></div>
				
					<table class="tabheader" width="90%" >
						<tr id="oToolBar">
							<td align="left" nowrap=""><bean:message key="common.page" 
								arg0="<%=String.valueOf(PageTunerForm.get("pageIndex"))%>"
								arg1="<%=String.valueOf(PageTunerForm.get("totalPages"))%>"
								arg2="<%=String.valueOf(PageTunerForm.get("totalRows"))%>" /></td>
							<td align="left" nowrap="">&nbsp;</td>
							<td align="left" width="5%" nowrap=""><bean:message key="taskschedule.taskid" />: <%=request.getParameter("taskid")
								%> <bean:message key="taskschedule.datekey" />: <%=request.getParameter("datekey")%></td>
							<td align="left" width="5%" nowrap=""><bean:message key="common.autoRefresh" /></td>
							<td align="left" width="5%" nowrap=""><input type="checkbox" name="autoRefresh" value="1" <%="1".equals(request.getParameter("autoRefresh")) ? "checked " : "" %>></td>
							<td align="left" nowrap="">&nbsp;</td>
							<td align="right" width="3%" nowrap=""><a href="javascript: oListForm.submit(); "><html:img src="../images/msrefresh.gif" altKey="common.refresh" /></a></td>
							<td align="right" width="3%" nowrap=""><a href="javascript: window.print(); "><html:img src="../images/prints.gif" altKey="common.print" titleKey="common.pageprint.title" /></a></td>
						</tr>
					</table>
					
					<table id="oCube" width="90%" cellspacing="0" class="listpanel">
						<tr class="layer00">
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 11)"><bean:message key="taskdependence.deptaskid" /></a> <script>drawSortFlag(oListForm, 11)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 10)"><bean:message key="taskschedule.taskdesc" /></a> <script>drawSortFlag(oListForm, 10)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 5)"><bean:message key="taskschedule.statuscode" /></a> <script>drawSortFlag(oListForm, 5)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 6)"><bean:message key="taskschedule.exectime" /></a> <script>drawSortFlag(oListForm, 6)</script></td>
							<td class="type" nowrap ><a href="javascript:sortBy(oListForm, 7)"><bean:message key="taskschedule.termtime" /></a> <script>drawSortFlag(oListForm, 7)</script></td>
							<td class="typer" nowrap ><a href="javascript:sortBy(oListForm, 9)"><bean:message key="taskschedule.errmsg" /></a> <script>drawSortFlag(oListForm, 9)</script></td>
						</tr>
						<logic:iterate id="element" name="listResult">
						<tr class="layer<bean:write name="element" property="style" />">
							<td class="type0" nowrap ><a href="javascript: taskDependence('<bean:write name="element" property="datekey" formatKey="common.format.date" 
								/>', '<bean:write name="element" property="deptaskid" />');" title="<bean:message key="taskdependence.tips" />"><bean:write name="element" property="deptaskid" 
								/></a><logic:equal name="element" property="isignored" value="1" >*</logic:equal></td>
							<td class="type0" nowrap ><a href="#" title="<bean:write name="element" property="execurl_s" />"><bean:write name="element" property="taskdesc" /></a></td>
							<td class="type0" nowrap >
								<logic:equal name="element" property="statuscode" value="0"><bean:message key="taskschedule.statuscode.idle" /></logic:equal
								><logic:equal name="element" property="statuscode" value="1"><bean:message key="taskschedule.statuscode.ready" /></logic:equal
								><logic:equal name="element" property="statuscode" value="2"><bean:message key="taskschedule.statuscode.running" /></logic:equal
								><logic:equal name="element" property="statuscode" value="3"><bean:message key="taskschedule.statuscode.retry" /></logic:equal
								><logic:equal name="element" property="statuscode" value="4"><bean:message key="taskschedule.statuscode.fault" /></logic:equal
								><logic:equal name="element" property="statuscode" value="5"><bean:message key="taskschedule.statuscode.finished" /></logic:equal
								><logic:equal name="element" property="statuscode" value="6"><bean:message key="taskschedule.statuscode.canceled" /></logic:equal
								></td>
							<td class="type3" nowrap ><bean:write name="element" property="exectime" formatKey="common.format.datetime" /></td>
							<td class="type3" nowrap ><bean:write name="element" property="termtime" formatKey="common.format.datetime" /></td>
							<td class="type0" nowrap ><bean:write name="element" property="errmsg_s" /></td>
						</logic:iterate>
					</table>
					<table class="tabfooter" width="90%" >
						<tr>
							<td align="left" nowrap=""></td>
							<td align="right" width="30%" nowrap="" id="oPageNavigator"></td>
							<td align="right" width="5%" nowrap=""> <bean:message key="common.rowsperpage.prefix" /></td>
							<td align="right" width="2%" nowrap=""><html:text property="rowsPerPage" size="2" /></td>
							<td align="right" width="5%" nowrap=""><bean:message key="common.rowsperpage.postfix" /></td>
						</tr>
					</table>
				</html:form>
			</td>
			<!-- td id="oFrame" nowrap="" class="infoframe" rowspan="2">&nbsp;</td -->
		</tr>
		<tr>
			<td class="clientfooter"><bean:message key="common.lastRefreshAt" arg0="<%=new java.util.Date().toString()%>" /></td>
		</tr>
	</table>

<script language="javascript">
function taskDependence(d, t)
{
	openSubWindow('/console/TaskDependence.do?sortIndexes=11&datekey=' + d + '&taskid=' + t, 640, 480, '_blank')
}
function oninit()
{
	var nTotalPages = <bean:write name="PageTunerForm" property="totalPages" />;
	var nPageIndex = <bean:write name="PageTunerForm" property="pageIndex" />;
	
	addPageTuner(oToolBar, oListForm.pageIndex, nPageIndex, nTotalPages);
	addPageNavigator(oPageNavigator, oListForm.pageIndex, nPageIndex, nTotalPages);
	
	setInterval("reloadList()", 5000);
}
function reloadList()
{
	if (oListForm.autoRefresh.checked)
		oListForm.submit();
}
</script>
<script for="window" event="onbeforeprint">document.all.oCssLink.href = "../style/default_auxp.css";</script>
<script for="window" event="onafterprint">document.all.oCssLink.href = "../style/default_aux.css";</script>
</body>
</html:html>










